// eslint-disable-next-line no-unused-vars
import {getRequest,postRequest} from "@/utils/request";


/**
 *  用户登陆
 * @param url 登陆请求接口
 * @param params 参数
 * @returns {AxiosPromise}
 * @constructor
 */
export const getOldInfo = () => {
    return getRequest(`/old/getOldster`);
};

export const getOneInfo = (name) => {
    console.log(name)
    return getRequest(`/old/getOldster?name=${name}`);
};
export const addOneOld = (params) => {
    return postRequest('/old/add',params);
};
export const deOneOld = (param) => {
    return postRequest('/old/delete',param);
};
export const updateOneOld = (param) => {
    return postRequest('/old/oldsterUpdate',param);
};
export const getWorkerInfo = () => {
    return getRequest(`/worker/getWorker`);
};
export const oneWorkerInfo = (name) => {
    return getRequest(`/worker/getWorker?name=${name}`);
};
export const addOneWorker = (params) => {
    return postRequest('/worker/add',params);
};
export const deOneWorker = (param) => {
    return postRequest('/worker/delete',param);
};
export const updateOneWorker = (param) => {
    return postRequest('/worker/workerUpdate',param);
};

